package router

import (
	"k8s-admin/controller/kubernetes"
	"k8s-admin/middleware"

	"github.com/gin-gonic/gin"
)

func Services(r *gin.Engine) {
	services := r.Group("services/:cid")
	services.Use(middleware.K8sCache())
	{
		services.GET("getClusterServiceList", kubernetes.GetClusterServiceLists)
		services.GET("getClusterServiceInfo", kubernetes.ServiceInfo)
		services.GET("getClusterServiceYaml", kubernetes.GetClusterServiceYaml)
		services.POST("createClusterService", kubernetes.CreateClusterService)
		services.POST("createClusterServiceYaml", kubernetes.CreateClusterServiceYaml)
		services.DELETE("deleteK8sClusterService", kubernetes.DeleteK8sClusterService)
		services.PUT("updateK8sClusterService", kubernetes.UpdateClusterService)
	}
}
